package com.csun.dsms.service.impl;

import com.csun.dsms.comment.core.support.BaseService;
import com.csun.dsms.mapper.DsmsCompanyMapper;
import com.csun.dsms.model.domain.DsmsCompany;
import com.csun.dsms.model.vo.company.CompanyInfoVo;
import com.csun.dsms.service.DsmsCompanyService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class DsmsCompanyServiceImpl extends BaseService<DsmsCompany> implements DsmsCompanyService {

    @Resource
    private DsmsCompanyMapper dsmsCompanyMapper;

    /*
     * 服务公司的查询
     * */
    @Override
    public List<DsmsCompany> query(DsmsCompany dsmsCompany) {
        return dsmsCompanyMapper.query(dsmsCompany);
    }

    @Override
    public List<DsmsCompany> queryByCondition(DsmsCompany company) {
        return dsmsCompanyMapper.queryByCondition(company);
    }

    @Override
    public List<DsmsCompany> queryCompany(Object o) {
        return dsmsCompanyMapper.queryCompany(o);
    }

    //根据单位查询服务公司
    @Override
    public CompanyInfoVo selectByUnitId(Long unitId) {
        return dsmsCompanyMapper.selectByUnitId(unitId);
    }
}
